const http = uni.$u.http

export default {
	/**
	 * 根据轮播图ID获取轮播图
	 *  - get请求
	 */
	getSpiderImgAPI: (id = 468) => {
		return http.get('/carouselgroup/' + id);
	},

	/**
	 * 文件上传
	 *  - post请求
	 */
	uploadFilesAPI: (file) => {
		return http.post('/update', {
			file,
		}, {
			custom: {
				auth: true
			},
			dataType: 'application/form-data'
		});
	},

	/**
	 * base64文件上传
	 *  - post请求
	 */
	uploadImageAPI: (file) => {
		return http.post('/upload/base64', {
			file
		}, {
			custom: {
				auth: true
			},
		});
	}
}